<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>qLibc: containers/qlisttbl.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">qLibc
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('qlisttbl_8c.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">qlisttbl.c File Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Linked-list-table implementation.  
<a href="#details">More...</a></p>

<p><a href="qlisttbl_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a0df1c9358a8712794a8a0030a1687f62"><td class="memItemLeft" align="right" valign="top">qlisttbl_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#a0df1c9358a8712794a8a0030a1687f62">qlisttbl</a> (int options)</td></tr>
<tr class="memdesc:a0df1c9358a8712794a8a0030a1687f62"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new Q_LIST linked-list container.  <br /></td></tr>
<tr class="separator:a0df1c9358a8712794a8a0030a1687f62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a073065190797d183a08f0a5325a01a1e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#a073065190797d183a08f0a5325a01a1e">qlisttbl_put</a> (qlisttbl_t *tbl, const char *name, const void *data, size_t size)</td></tr>
<tr class="memdesc:a073065190797d183a08f0a5325a01a1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;<a class="el" href="qhttpclient_8c.html#ae9ac3bd43c11509c0cbd8fb284bf13eb" title="qhttpclient-&gt;put(): Uploads a file to the remote host using PUT method.">put()</a>: Put an element to this table.  <br /></td></tr>
<tr class="separator:a073065190797d183a08f0a5325a01a1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b4fe528a8b64efd31e7927fbcfcc7ab"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#a7b4fe528a8b64efd31e7927fbcfcc7ab">qlisttbl_putstr</a> (qlisttbl_t *tbl, const char *name, const char *str)</td></tr>
<tr class="memdesc:a7b4fe528a8b64efd31e7927fbcfcc7ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;putstr(): Put a string into this table.  <br /></td></tr>
<tr class="separator:a7b4fe528a8b64efd31e7927fbcfcc7ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a10ea86e362efe15c888a91444d48af73"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#a10ea86e362efe15c888a91444d48af73">qlisttbl_putstrf</a> (qlisttbl_t *tbl, const char *name, const char *format,...)</td></tr>
<tr class="memdesc:a10ea86e362efe15c888a91444d48af73"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;putstrf(): Put a formatted string into this table.  <br /></td></tr>
<tr class="separator:a10ea86e362efe15c888a91444d48af73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2bc37eee74430649a238b7c3dd62518b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#a2bc37eee74430649a238b7c3dd62518b">qlisttbl_putint</a> (qlisttbl_t *tbl, const char *name, int64_t num)</td></tr>
<tr class="memdesc:a2bc37eee74430649a238b7c3dd62518b"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;putInt(): Put an integer into this table as string type.  <br /></td></tr>
<tr class="separator:a2bc37eee74430649a238b7c3dd62518b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5d3f27fe3d3e32327463dc86c73283e"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#ad5d3f27fe3d3e32327463dc86c73283e">qlisttbl_get</a> (qlisttbl_t *tbl, const char *name, size_t *size, bool newmem)</td></tr>
<tr class="memdesc:ad5d3f27fe3d3e32327463dc86c73283e"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;<a class="el" href="qhttpclient_8c.html#af16a3eb0912e8b5d4896466632d9c843" title="qhttpclient-&gt;get(): Downloads a file from the remote host using GET method.">get()</a>: Finds an object with given name.  <br /></td></tr>
<tr class="separator:ad5d3f27fe3d3e32327463dc86c73283e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a759de18f2f11bfb03a7d07a1c06f3152"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#a759de18f2f11bfb03a7d07a1c06f3152">qlisttbl_getstr</a> (qlisttbl_t *tbl, const char *name, bool newmem)</td></tr>
<tr class="memdesc:a759de18f2f11bfb03a7d07a1c06f3152"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;getstr(): Finds an object with given name and returns as string type.  <br /></td></tr>
<tr class="separator:a759de18f2f11bfb03a7d07a1c06f3152"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af14aa8d272fa39b24260ead37410e4ac"><td class="memItemLeft" align="right" valign="top">int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#af14aa8d272fa39b24260ead37410e4ac">qlisttbl_getint</a> (qlisttbl_t *tbl, const char *name)</td></tr>
<tr class="memdesc:af14aa8d272fa39b24260ead37410e4ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;getint(): Finds an object with given name and returns as integer type.  <br /></td></tr>
<tr class="separator:af14aa8d272fa39b24260ead37410e4ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a060ae322424932b3cc2fda83a037e1e2"><td class="memItemLeft" align="right" valign="top">qlisttbl_data_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#a060ae322424932b3cc2fda83a037e1e2">qlisttbl_getmulti</a> (qlisttbl_t *tbl, const char *name, bool newmem, size_t *numobjs)</td></tr>
<tr class="memdesc:a060ae322424932b3cc2fda83a037e1e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;getmulti(): Finds all objects with given name and return a array of objects.  <br /></td></tr>
<tr class="separator:a060ae322424932b3cc2fda83a037e1e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e0d4e684118fd2b6f65b0a71c2306b4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#a3e0d4e684118fd2b6f65b0a71c2306b4">qlisttbl_freemulti</a> (qlisttbl_data_t *objs)</td></tr>
<tr class="memdesc:a3e0d4e684118fd2b6f65b0a71c2306b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;freemulti(): Deallocate object array returned by getmulti().  <br /></td></tr>
<tr class="separator:a3e0d4e684118fd2b6f65b0a71c2306b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac494b02523019a449c29cf1049ef4e60"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#ac494b02523019a449c29cf1049ef4e60">qlisttbl_remove</a> (qlisttbl_t *tbl, const char *name)</td></tr>
<tr class="memdesc:ac494b02523019a449c29cf1049ef4e60"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;remove(): Remove matched objects with given name.  <br /></td></tr>
<tr class="separator:ac494b02523019a449c29cf1049ef4e60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41e4658b9680da54c0d7b97ae046999c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#a41e4658b9680da54c0d7b97ae046999c">qlisttbl_removeobj</a> (qlisttbl_t *tbl, const qlisttbl_obj_t *obj)</td></tr>
<tr class="memdesc:a41e4658b9680da54c0d7b97ae046999c"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;removeobj(): Remove objects with given object pointer.  <br /></td></tr>
<tr class="separator:a41e4658b9680da54c0d7b97ae046999c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abda3a975b1c2869d4af44cb69674252b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#abda3a975b1c2869d4af44cb69674252b">qlisttbl_getnext</a> (qlisttbl_t *tbl, qlisttbl_obj_t *obj, const char *name, bool newmem)</td></tr>
<tr class="memdesc:abda3a975b1c2869d4af44cb69674252b"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;getnext(): Get next element.  <br /></td></tr>
<tr class="separator:abda3a975b1c2869d4af44cb69674252b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47c3a686f2d4bbf628c39d4cb41b5969"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#a47c3a686f2d4bbf628c39d4cb41b5969">qlisttbl_size</a> (qlisttbl_t *tbl)</td></tr>
<tr class="memdesc:a47c3a686f2d4bbf628c39d4cb41b5969"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;size(): Returns the number of elements in this table.  <br /></td></tr>
<tr class="separator:a47c3a686f2d4bbf628c39d4cb41b5969"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1dcf1c93e52b6f63f8c8ba0031a45803"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#a1dcf1c93e52b6f63f8c8ba0031a45803">qlisttbl_sort</a> (qlisttbl_t *tbl)</td></tr>
<tr class="memdesc:a1dcf1c93e52b6f63f8c8ba0031a45803"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;sort(): Sort keys in this table.  <br /></td></tr>
<tr class="separator:a1dcf1c93e52b6f63f8c8ba0031a45803"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90de20495b1a65ecb1cb6a94cced3a0f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#a90de20495b1a65ecb1cb6a94cced3a0f">qlisttbl_clear</a> (qlisttbl_t *tbl)</td></tr>
<tr class="memdesc:a90de20495b1a65ecb1cb6a94cced3a0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;clear(): Removes all of the elements from this table.  <br /></td></tr>
<tr class="separator:a90de20495b1a65ecb1cb6a94cced3a0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c96de65d427e08ce4e3a34340fd7bdd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#a9c96de65d427e08ce4e3a34340fd7bdd">qlisttbl_save</a> (qlisttbl_t *tbl, const char *filepath, char sepchar, bool encode)</td></tr>
<tr class="memdesc:a9c96de65d427e08ce4e3a34340fd7bdd"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;save(): Save qlisttbl as plain text format Dumping direction is always forward(from the top to the bottom) to preserve the order when we load the file again.  <br /></td></tr>
<tr class="separator:a9c96de65d427e08ce4e3a34340fd7bdd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee9cb892f83b75dd7d573c59ac83b3f5"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#aee9cb892f83b75dd7d573c59ac83b3f5">qlisttbl_load</a> (qlisttbl_t *tbl, const char *filepath, char sepchar, bool decode)</td></tr>
<tr class="memdesc:aee9cb892f83b75dd7d573c59ac83b3f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;load(): Load and append entries from given filepath Loading direction is always appending at the bottom of the table to preserve the order as it was.  <br /></td></tr>
<tr class="separator:aee9cb892f83b75dd7d573c59ac83b3f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8e4a8e033d630b7c7a88ba608a60ab4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#ab8e4a8e033d630b7c7a88ba608a60ab4">qlisttbl_debug</a> (qlisttbl_t *tbl, FILE *out)</td></tr>
<tr class="memdesc:ab8e4a8e033d630b7c7a88ba608a60ab4"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;debug(): Print out stored elements for debugging purpose.  <br /></td></tr>
<tr class="separator:ab8e4a8e033d630b7c7a88ba608a60ab4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6eeeb3c4a73a9e6c80a18d2a8a0c0351"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#a6eeeb3c4a73a9e6c80a18d2a8a0c0351">qlisttbl_lock</a> (qlisttbl_t *tbl)</td></tr>
<tr class="memdesc:a6eeeb3c4a73a9e6c80a18d2a8a0c0351"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;lock(): Enter critical section.  <br /></td></tr>
<tr class="separator:a6eeeb3c4a73a9e6c80a18d2a8a0c0351"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fa35afd89db427de7454a7dc174f366"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#a6fa35afd89db427de7454a7dc174f366">qlisttbl_unlock</a> (qlisttbl_t *tbl)</td></tr>
<tr class="memdesc:a6fa35afd89db427de7454a7dc174f366"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;unlock(): Leave critical section.  <br /></td></tr>
<tr class="separator:a6fa35afd89db427de7454a7dc174f366"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6dfcb2ffbd01fd4273605bc4684cccd9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="qlisttbl_8c.html#a6dfcb2ffbd01fd4273605bc4684cccd9">qlisttbl_free</a> (qlisttbl_t *tbl)</td></tr>
<tr class="memdesc:a6dfcb2ffbd01fd4273605bc4684cccd9"><td class="mdescLeft">&#160;</td><td class="mdescRight">qlisttbl-&gt;free(): Free qlisttbl_t  <br /></td></tr>
<tr class="separator:a6dfcb2ffbd01fd4273605bc4684cccd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Linked-list-table implementation. </p>
<p>qlisttbl container is a Linked-List-Table implementation. Which maps keys to values. Key is a string and value is any non-null object. These elements are stored sequentially in Doubly-Linked-List data structure.</p>
<p>Compared to Hash-Table, List-Table is efficient when you need to keep duplicated keys since Hash-Table only keep unique keys. Of course, qlisttbl supports both unique keys and key duplication.</p>
<div class="fragment"><div class="line">[Conceptional Data Structure Diagram]</div>
<div class="line"> </div>
<div class="line">last~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+</div>
<div class="line">                                                        |</div>
<div class="line">        +-----------+  doubly  +-----------+  doubly  +-v---------+</div>
<div class="line">first~~~|~&gt;   0   &lt;~|~~~~~~~~~~|~&gt;   1   &lt;~|~~~~~~~~~~|~&gt;   N     |</div>
<div class="line">        +--|-----|--+  linked  +--|-----|--+  linked  +--|-----|--+</div>
<div class="line">           |     |                |     |                |     |</div>
<div class="line">     +-----v-+ +-v-------+        |     |          +-----v-+ +-v-------+</div>
<div class="line">     | KEY A | | VALUE A |        |     |          | KEY N | | VALUE N |</div>
<div class="line">     +-------+ +---------+        |     |          +-------+ +---------+</div>
<div class="line">                            +-----v-+ +-v-------+</div>
<div class="line">                            | KEY B | | VALUE B |</div>
<div class="line">                            +-------+ +---------+</div>
</div><!-- fragment --><div class="fragment"><div class="line"><span class="comment">// create a list table.</span></div>
<div class="line">qlisttbl_t *tbl = <a class="code hl_function" href="qlisttbl_8c.html#a0df1c9358a8712794a8a0030a1687f62">qlisttbl</a>(QLISTTBL_THREADSAFE);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// insert elements (key duplication allowed)</span></div>
<div class="line">tbl-&gt;put(tbl, <span class="stringliteral">&quot;e1&quot;</span>, <span class="stringliteral">&quot;a&quot;</span>, strlen(<span class="stringliteral">&quot;e1&quot;</span>)+1); <span class="comment">// equal to putstr();</span></div>
<div class="line">tbl-&gt;putstr(tbl, <span class="stringliteral">&quot;e2&quot;</span>, <span class="stringliteral">&quot;b&quot;</span>);</div>
<div class="line">tbl-&gt;putstr(tbl, <span class="stringliteral">&quot;e2&quot;</span>, <span class="stringliteral">&quot;c&quot;</span>);</div>
<div class="line">tbl-&gt;putstr(tbl, <span class="stringliteral">&quot;e3&quot;</span>, <span class="stringliteral">&quot;d&quot;</span>);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// debug output</span></div>
<div class="line">tbl-&gt;debug(tbl, stdout, <span class="keyword">true</span>);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// get element</span></div>
<div class="line">printf(<span class="stringliteral">&quot;get(&#39;e2&#39;) : %s\n&quot;</span>, (<span class="keywordtype">char</span>*)tbl-&gt;get(tbl, <span class="stringliteral">&quot;e2&quot;</span>, NULL, <span class="keyword">false</span>));</div>
<div class="line">printf(<span class="stringliteral">&quot;getstr(&#39;e2&#39;) : %s\n&quot;</span>, tbl-&gt;getstr(tbl, <span class="stringliteral">&quot;e2&quot;</span>, <span class="keyword">false</span>));</div>
<div class="line"> </div>
<div class="line"><span class="comment">// get all matching elements</span></div>
<div class="line">qlisttbl_data_t *objs = tbl-&gt;getmulti(tbl, <span class="stringliteral">&quot;e2&quot;</span>, <span class="keyword">true</span>, NULL);</div>
<div class="line"><span class="keywordflow">for</span> (i = 0; objs[i].data != NULL; i++) {</div>
<div class="line">    printf(<span class="stringliteral">&quot;getmulti(&#39;e2&#39;)[%d] : %s (size=%d)\n&quot;</span>,</div>
<div class="line">            i, (<span class="keywordtype">char</span> *)objs[i].data, (<span class="keywordtype">int</span>)objs[i].size);</div>
<div class="line">}</div>
<div class="line">tbl-&gt;freemulti(objs);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// find every &#39;e2&#39; elements</span></div>
<div class="line">qlisttbl_obj_t obj;</div>
<div class="line">memset((<span class="keywordtype">void</span>*)&amp;obj, 0, <span class="keyword">sizeof</span>(obj)); <span class="comment">// must be cleared before call</span></div>
<div class="line"><span class="keywordflow">while</span>(tbl-&gt;getnext(tbl, &amp;obj, <span class="stringliteral">&quot;e2&quot;</span>, <span class="keyword">false</span>) == <span class="keyword">true</span>) {</div>
<div class="line">  printf(<span class="stringliteral">&quot;NAME=%s, DATA=%s, SIZE=%zu\n&quot;</span>,</div>
<div class="line">         obj.name, (<span class="keywordtype">char</span>*)obj.data, obj.size);</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">// free object</span></div>
<div class="line">tbl-&gt;free(tbl);</div>
<div class="ttc" id="aqlisttbl_8c_html_a0df1c9358a8712794a8a0030a1687f62"><div class="ttname"><a href="qlisttbl_8c.html#a0df1c9358a8712794a8a0030a1687f62">qlisttbl</a></div><div class="ttdeci">qlisttbl_t * qlisttbl(int options)</div><div class="ttdoc">Create a new Q_LIST linked-list container.</div><div class="ttdef"><b>Definition</b> <a href="qlisttbl_8c_source.html#l00150">qlisttbl.c:150</a></div></div>
</div><!-- fragment --> 
<p class="definition">Definition in file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a0df1c9358a8712794a8a0030a1687f62" name="a0df1c9358a8712794a8a0030a1687f62"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0df1c9358a8712794a8a0030a1687f62">&#9670;&#160;</a></span>qlisttbl()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">qlisttbl_t * qlisttbl </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>options</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new Q_LIST linked-list container. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">options</td><td>combination of initialization options.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer of malloced qlisttbl_t structure in case of successful, otherwise returns NULL. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">errno</td><td>will be set in error condition.<ul>
<li>ENOMEM : Memory allocation failure.</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">qlisttbl_t *tbl = <a class="code hl_function" href="qlisttbl_8c.html#a0df1c9358a8712794a8a0030a1687f62">qlisttbl</a>(0);</div>
<div class="line">qlisttbl_t *threadsafe_tbl = <a class="code hl_function" href="qlisttbl_8c.html#a0df1c9358a8712794a8a0030a1687f62">qlisttbl</a>(QLISTTBL_THREADSAFE);</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>Available options:<ul>
<li>QLISTTBL_THREADSAFE - make it thread-safe.</li>
<li>QLISTTBL_UNIQUE - keys are all unique. replace same key</li>
<li>QLISTTBL_CASEINSENSITIVE - key is case insensitive</li>
<li>QLISTTBL_INSERTTOP - insert new key at the top</li>
<li>QLISTTBL_LOOKUPFORWARD - find key from the top </li>
</ul>
</dd></dl>

<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00150">150</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="a073065190797d183a08f0a5325a01a1e" name="a073065190797d183a08f0a5325a01a1e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a073065190797d183a08f0a5325a01a1e">&#9670;&#160;</a></span>qlisttbl_put()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool qlisttbl_put </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;<a class="el" href="qhttpclient_8c.html#ae9ac3bd43c11509c0cbd8fb284bf13eb" title="qhttpclient-&gt;put(): Uploads a file to the remote host using PUT method.">put()</a>: Put an element to this table. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer. </td></tr>
    <tr><td class="paramname">name</td><td>element name. </td></tr>
    <tr><td class="paramname">data</td><td>a pointer which points data memory. </td></tr>
    <tr><td class="paramname">size</td><td>size of the data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if successful, otherwise returns false. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">errno</td><td>will be set in error condition.<ul>
<li>ENOMEM : Memory allocation failure.</li>
<li>EINVAL : Invalid argument.</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><span class="keyword">struct </span>my_obj {</div>
<div class="line">  <span class="keywordtype">int</span> a, b, c;</div>
<div class="line">};</div>
<div class="line"> </div>
<div class="line"><span class="comment">// create a sample object.</span></div>
<div class="line"><span class="keyword">struct </span>my_obj obj;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// create a table and add a sample object.</span></div>
<div class="line">qlisttbl_t *tbl = <a class="code hl_function" href="qlisttbl_8c.html#a0df1c9358a8712794a8a0030a1687f62">qlisttbl</a>();</div>
<div class="line">tbl-&gt;put(tbl, <span class="stringliteral">&quot;obj1&quot;</span>, &amp;obj, <span class="keyword">sizeof</span>(<span class="keyword">struct</span> my_obj));</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>The default behavior is adding an object at the end of this table unless QLISTTBL_INSERTTOP option was given. </dd></dl>

<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00249">249</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="a7b4fe528a8b64efd31e7927fbcfcc7ab" name="a7b4fe528a8b64efd31e7927fbcfcc7ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b4fe528a8b64efd31e7927fbcfcc7ab">&#9670;&#160;</a></span>qlisttbl_putstr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool qlisttbl_putstr </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;putstr(): Put a string into this table. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer. </td></tr>
    <tr><td class="paramname">name</td><td>element name. </td></tr>
    <tr><td class="paramname">str</td><td>string data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if successful, otherwise returns false. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">errno</td><td>will be set in error condition.<ul>
<li>ENOMEM : Memory allocation failure.</li>
<li>EINVAL : Invalid argument. </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00296">296</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="a10ea86e362efe15c888a91444d48af73" name="a10ea86e362efe15c888a91444d48af73"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a10ea86e362efe15c888a91444d48af73">&#9670;&#160;</a></span>qlisttbl_putstrf()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool qlisttbl_putstrf </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;putstrf(): Put a formatted string into this table. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer. </td></tr>
    <tr><td class="paramname">name</td><td>element name. </td></tr>
    <tr><td class="paramname">format</td><td>formatted value string.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if successful, otherwise returns false. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">errno</td><td>will be set in error condition.<ul>
<li>ENOMEM : Memory allocation failure.</li>
<li>EINVAL : Invalid argument. </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00314">314</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="a2bc37eee74430649a238b7c3dd62518b" name="a2bc37eee74430649a238b7c3dd62518b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2bc37eee74430649a238b7c3dd62518b">&#9670;&#160;</a></span>qlisttbl_putint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool qlisttbl_putint </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t&#160;</td>
          <td class="paramname"><em>num</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;putInt(): Put an integer into this table as string type. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer. </td></tr>
    <tr><td class="paramname">name</td><td>element name. </td></tr>
    <tr><td class="paramname">num</td><td>number data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if successful, otherwise returns false. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">errno</td><td>will be set in error condition.<ul>
<li>ENOMEM : Memory allocation failure.</li>
<li>EINVAL : Invalid argument.</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The integer will be converted to a string object and stored as a string object. </dd></dl>

<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00345">345</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="ad5d3f27fe3d3e32327463dc86c73283e" name="ad5d3f27fe3d3e32327463dc86c73283e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad5d3f27fe3d3e32327463dc86c73283e">&#9670;&#160;</a></span>qlisttbl_get()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void * qlisttbl_get </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>newmem</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;<a class="el" href="qhttpclient_8c.html#af16a3eb0912e8b5d4896466632d9c843" title="qhttpclient-&gt;get(): Downloads a file from the remote host using GET method.">get()</a>: Finds an object with given name. </p>
<p>If there are duplicate keys in the table, this will return the first matched one from the bottom (or the top if QLISTTBL_LOOKUPFORWARD option was given). So if there are duplicated keys, it'll return recently inserted one.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer. </td></tr>
    <tr><td class="paramname">name</td><td>element name. </td></tr>
    <tr><td class="paramname">size</td><td>if size is not NULL, data size will be stored. </td></tr>
    <tr><td class="paramname">newmem</td><td>whether or not to allocate memory for the data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer of data if key is found, otherwise returns NULL. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">errno</td><td>will be set in error condition.<ul>
<li>ENOENT : No such key found.</li>
<li>EINVAL : Invalid argument.</li>
<li>ENOMEM : Memory allocation failure.</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">qlisttbl_t *tbl = <a class="code hl_function" href="qlisttbl_8c.html#a0df1c9358a8712794a8a0030a1687f62">qlisttbl</a>();</div>
<div class="line">(...codes...)</div>
<div class="line"> </div>
<div class="line"><span class="comment">// with newmem flag unset</span></div>
<div class="line"><span class="keywordtype">size_t</span> size;</div>
<div class="line"><span class="keywordtype">void</span> *data = tbl-&gt;get(tbl, <span class="stringliteral">&quot;key_name&quot;</span>, &amp;size, <span class="keyword">false</span>);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// with newmem flag set</span></div>
<div class="line"><span class="keywordtype">size_t</span> size;</div>
<div class="line"><span class="keywordtype">void</span> *data = tbl-&gt;get(tbl, <span class="stringliteral">&quot;key_name&quot;</span>, &amp;size, <span class="keyword">true</span>);</div>
<div class="line">(...does something with data...)</div>
<div class="line"><span class="keywordflow">if</span>(data != NULL) free(data);</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>If newmem flag is set, returned data will be malloced and should be deallocated by user. Otherwise returned pointer will point internal data buffer directly and should not be de-allocated by user. In thread-safe mode, always set newmem flag as true to make sure it works in race condition situation. </dd></dl>

<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00392">392</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="a759de18f2f11bfb03a7d07a1c06f3152" name="a759de18f2f11bfb03a7d07a1c06f3152"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a759de18f2f11bfb03a7d07a1c06f3152">&#9670;&#160;</a></span>qlisttbl_getstr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char * qlisttbl_getstr </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>newmem</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;getstr(): Finds an object with given name and returns as string type. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer. </td></tr>
    <tr><td class="paramname">name</td><td>element name. </td></tr>
    <tr><td class="paramname">newmem</td><td>whether or not to allocate memory for the data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer of data if key is found, otherwise returns NULL. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">errno</td><td>will be set in error condition.<ul>
<li>ENOENT : No such key found.</li>
<li>EINVAL : Invalid argument.</li>
<li>ENOMEM : Memory allocation failure. </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00442">442</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="af14aa8d272fa39b24260ead37410e4ac" name="af14aa8d272fa39b24260ead37410e4ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af14aa8d272fa39b24260ead37410e4ac">&#9670;&#160;</a></span>qlisttbl_getint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int64_t qlisttbl_getint </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;getint(): Finds an object with given name and returns as integer type. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer. </td></tr>
    <tr><td class="paramname">name</td><td>element name.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an integer value of the integer object, otherwise returns 0. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">errno</td><td>will be set in error condition.<ul>
<li>ENOENT : No such key found.</li>
<li>EINVAL : Invalid argument.</li>
<li>ENOMEM : Memory allocation failure. </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00460">460</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="a060ae322424932b3cc2fda83a037e1e2" name="a060ae322424932b3cc2fda83a037e1e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a060ae322424932b3cc2fda83a037e1e2">&#9670;&#160;</a></span>qlisttbl_getmulti()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">qlisttbl_data_t * qlisttbl_getmulti </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>newmem</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>numobjs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;getmulti(): Finds all objects with given name and return a array of objects. </p>
<p>If there are duplicate keys in the table, this will return all the matched ones. The order of objects in return depends on setnextdir() setting. By default, the order is same(forward) as listed in the table.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer. </td></tr>
    <tr><td class="paramname">name</td><td>element name. </td></tr>
    <tr><td class="paramname">newmem</td><td>whether or not to allocate memory for the data. </td></tr>
    <tr><td class="paramname">numobjs</td><td>the nuber of objects returned will be stored. (can be NULL)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer of data if key is found, otherwise returns NULL. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">errno</td><td>will be set in error condition.<ul>
<li>ENOENT : No such key found.</li>
<li>EINVAL : Invalid argument.</li>
<li>ENOMEM : Memory allocation failure.</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The returned array of qlisttbl_data_t should be released by freemulti() call after use. Even you call getmulti() with newmem set false, freemulti() should be called all the times, so the object array itself can be released.</dd></dl>
<div class="fragment"><div class="line"><span class="keywordtype">size_t</span> numobjs = 0;</div>
<div class="line">qlisttbl_data_t *objs = tbl-&gt;getmulti(tbl, <span class="stringliteral">&quot;e2&quot;</span>, <span class="keyword">true</span>, &amp;numobjs);</div>
<div class="line"><span class="keywordflow">for</span> (i = 0; objs[i].data != NULL; i++) {</div>
<div class="line">    printf(<span class="stringliteral">&quot;DATA=%s, SIZE=%zu\n&quot;</span>, i, (<span class="keywordtype">char</span> *)objs[i].data, objs[i].size);</div>
<div class="line">}</div>
<div class="line">tbl-&gt;freemulti(objs);</div>
</div><!-- fragment --> 
<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00504">504</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="a3e0d4e684118fd2b6f65b0a71c2306b4" name="a3e0d4e684118fd2b6f65b0a71c2306b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e0d4e684118fd2b6f65b0a71c2306b4">&#9670;&#160;</a></span>qlisttbl_freemulti()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void qlisttbl_freemulti </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_data_t *&#160;</td>
          <td class="paramname"><em>objs</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;freemulti(): Deallocate object array returned by getmulti(). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">objs</td><td>pointer of array of qlisttbl_data_t.</td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">qlisttbl_data_t *objs = tbl-&gt;getmulti(tbl, <span class="stringliteral">&quot;newmem is true&quot;</span>, <span class="keyword">true</span>, &amp;numobjs);</div>
<div class="line">tbl-&gt;freemulti(objs);  <span class="comment">// frees allocated objects and object array itself.</span></div>
<div class="line"> </div>
<div class="line">qlisttbl_data_t *objs = tbl-&gt;getmulti(tbl, <span class="stringliteral">&quot;even newmem is false&quot;</span>, <span class="keyword">false</span>, &amp;numobjs);</div>
<div class="line">tbl-&gt;freemulti(objs);  <span class="comment">// frees object array itself.</span></div>
</div><!-- fragment --> 
<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00573">573</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="ac494b02523019a449c29cf1049ef4e60" name="ac494b02523019a449c29cf1049ef4e60"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac494b02523019a449c29cf1049ef4e60">&#9670;&#160;</a></span>qlisttbl_remove()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t qlisttbl_remove </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;remove(): Remove matched objects with given name. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer. </td></tr>
    <tr><td class="paramname">name</td><td>element name.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a number of removed objects. </dd></dl>

<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00593">593</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="a41e4658b9680da54c0d7b97ae046999c" name="a41e4658b9680da54c0d7b97ae046999c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a41e4658b9680da54c0d7b97ae046999c">&#9670;&#160;</a></span>qlisttbl_removeobj()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool qlisttbl_removeobj </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const qlisttbl_obj_t *&#160;</td>
          <td class="paramname"><em>obj</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;removeobj(): Remove objects with given object pointer. </p>
<p>This call is useful when you want to remove an element while traversing a table using getnext(). So the address pointed by obj maybe different than the actual object in a table, but it's ok because we'll recalculate the actual object address by referring it's links.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer. </td></tr>
    <tr><td class="paramname">name</td><td>element name.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if succeed on deletion, false if failed. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">errno</td><td>will be set in error condition.<ul>
<li>ENOENT : No such key found.</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line">qlisttbl_obj_t obj;</div>
<div class="line">memset((<span class="keywordtype">void</span>*)&amp;obj, 0, <span class="keyword">sizeof</span>(obj)); <span class="comment">// must be cleared before call</span></div>
<div class="line">tbl-&gt;lock(tbl);</div>
<div class="line"><span class="keywordflow">while</span>(tbl-&gt;getnext(tbl, &amp;obj, NULL, <span class="keyword">true</span>) == <span class="keyword">true</span>) {</div>
<div class="line">  tbl-&gt;removeobj(tbl, &amp;obj);  <span class="comment">// this will remove all entries in the table</span></div>
<div class="line">}</div>
<div class="line">tbl-&gt;unlock(tbl);</div>
</div><!-- fragment --> 
<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00636">636</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="abda3a975b1c2869d4af44cb69674252b" name="abda3a975b1c2869d4af44cb69674252b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abda3a975b1c2869d4af44cb69674252b">&#9670;&#160;</a></span>qlisttbl_getnext()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool qlisttbl_getnext </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">qlisttbl_obj_t *&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>newmem</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;getnext(): Get next element. </p>
<p>Default searching direction is backward, from the bottom to top unless QLISTTBL_LOOKUPFORWARD option was specified.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer. </td></tr>
    <tr><td class="paramname">obj</td><td>found data will be stored in this object </td></tr>
    <tr><td class="paramname">name</td><td>element name., if key name is NULL search every objects in the table. </td></tr>
    <tr><td class="paramname">newmem</td><td>whether or not to allocate memory for the data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if found otherwise returns false </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">errno</td><td>will be set in error condition.<ul>
<li>ENOENT : No next element.</li>
<li>ENOMEM : Memory allocation failure.</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The obj should be initialized with 0 by using memset() before first call. If newmem flag is true, user should de-allocate obj.name and obj.data resources.</dd></dl>
<div class="fragment"><div class="line">qlisttbl_t *tbl = <a class="code hl_function" href="qlisttbl_8c.html#a0df1c9358a8712794a8a0030a1687f62">qlisttbl</a>();</div>
<div class="line">(...add data into table...)</div>
<div class="line"> </div>
<div class="line"><span class="comment">// non-thread usages</span></div>
<div class="line">qlisttbl_obj_t obj;</div>
<div class="line">memset((<span class="keywordtype">void</span>*)&amp;obj, 0, <span class="keyword">sizeof</span>(obj)); <span class="comment">// must be cleared before call</span></div>
<div class="line"><span class="keywordflow">while</span>(tbl-&gt;getnext(tbl, &amp;obj, NULL, <span class="keyword">false</span>) == <span class="keyword">true</span>) {</div>
<div class="line">  printf(<span class="stringliteral">&quot;NAME=%s, DATA=%s, SIZE=%zu\n&quot;</span>,</div>
<div class="line">         obj.name, (<span class="keywordtype">char</span>*)obj.data, obj.size);</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">// thread model with particular key search</span></div>
<div class="line">qlisttbl_obj_t obj;</div>
<div class="line">memset((<span class="keywordtype">void</span>*)&amp;obj, 0, <span class="keyword">sizeof</span>(obj)); <span class="comment">// must be cleared before call</span></div>
<div class="line">tbl-&gt;lock(tbl);</div>
<div class="line"><span class="keywordflow">while</span>(tbl-&gt;getnext(tbl, &amp;obj, <span class="stringliteral">&quot;key_name&quot;</span>, <span class="keyword">true</span>) == <span class="keyword">true</span>) {</div>
<div class="line">  printf(<span class="stringliteral">&quot;NAME=%s, DATA=%s, SIZE=%zu\n&quot;</span>,</div>
<div class="line">         obj.name, (<span class="keywordtype">char</span>*)obj.data, obj.size);</div>
<div class="line">  free(obj.name);</div>
<div class="line">  free(obj.data);</div>
<div class="line">}</div>
<div class="line">tbl-&gt;unlock(tbl);</div>
</div><!-- fragment --> 
<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00727">727</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="a47c3a686f2d4bbf628c39d4cb41b5969" name="a47c3a686f2d4bbf628c39d4cb41b5969"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47c3a686f2d4bbf628c39d4cb41b5969">&#9670;&#160;</a></span>qlisttbl_size()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t qlisttbl_size </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;size(): Returns the number of elements in this table. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of elements in this table. </dd></dl>

<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00799">799</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="a1dcf1c93e52b6f63f8c8ba0031a45803" name="a1dcf1c93e52b6f63f8c8ba0031a45803"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1dcf1c93e52b6f63f8c8ba0031a45803">&#9670;&#160;</a></span>qlisttbl_sort()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void qlisttbl_sort </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;sort(): Sort keys in this table. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>It will sort the table in ascending manner, if you need descending order somehow, lookup-backword option will do the job without changing the order in the table.</dd></dl>
<div class="fragment"><div class="line">The appearence order of duplicated keys will be preserved in a sored table.</div>
<div class="line">See how duplicated key <span class="charliteral">&#39;b&#39;</span> is ordered in below example</div>
<div class="line"> </div>
<div class="line">[Unsorted]   [sorted ASC]    [sorted DES]</div>
<div class="line">  d = 1          a = 2           d = 1</div>
<div class="line">  a = 2          b = 3           c = 5</div>
<div class="line">  b = 3          b = 4           b = 3</div>
<div class="line">  b = 4          b = 6           b = 4</div>
<div class="line">  c = 5          c = 5           b = 6</div>
<div class="line">  b = 6          d = 1           a = 2</div>
</div><!-- fragment --> 
<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00826">826</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="a90de20495b1a65ecb1cb6a94cced3a0f" name="a90de20495b1a65ecb1cb6a94cced3a0f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a90de20495b1a65ecb1cb6a94cced3a0f">&#9670;&#160;</a></span>qlisttbl_clear()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void qlisttbl_clear </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;clear(): Removes all of the elements from this table. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00862">862</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="a9c96de65d427e08ce4e3a34340fd7bdd" name="a9c96de65d427e08ce4e3a34340fd7bdd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c96de65d427e08ce4e3a34340fd7bdd">&#9670;&#160;</a></span>qlisttbl_save()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool qlisttbl_save </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filepath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>sepchar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>encode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;save(): Save qlisttbl as plain text format Dumping direction is always forward(from the top to the bottom) to preserve the order when we load the file again. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer. </td></tr>
    <tr><td class="paramname">filepath</td><td>save file path </td></tr>
    <tr><td class="paramname">sepchar</td><td>separator character between name and value. normally '=' is used. </td></tr>
    <tr><td class="paramname">encode</td><td>flag for encoding data . false can be used if the all data are string or integer type and has no new line. otherwise true must be set.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if successful, otherwise returns false. </dd></dl>

<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00895">895</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="aee9cb892f83b75dd7d573c59ac83b3f5" name="aee9cb892f83b75dd7d573c59ac83b3f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee9cb892f83b75dd7d573c59ac83b3f5">&#9670;&#160;</a></span>qlisttbl_load()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t qlisttbl_load </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filepath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>sepchar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>decode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;load(): Load and append entries from given filepath Loading direction is always appending at the bottom of the table to preserve the order as it was. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer. </td></tr>
    <tr><td class="paramname">filepath</td><td>save file path </td></tr>
    <tr><td class="paramname">sepchar</td><td>separator character between name and value. normally '=' is used </td></tr>
    <tr><td class="paramname">decode</td><td>flag for decoding data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of loaded entries, otherwise returns -1. </dd></dl>

<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00941">941</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="ab8e4a8e033d630b7c7a88ba608a60ab4" name="ab8e4a8e033d630b7c7a88ba608a60ab4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab8e4a8e033d630b7c7a88ba608a60ab4">&#9670;&#160;</a></span>qlisttbl_debug()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool qlisttbl_debug </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>out</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;debug(): Print out stored elements for debugging purpose. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer. </td></tr>
    <tr><td class="paramname">out</td><td>output stream FILE descriptor such like stdout, stderr.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if successful, otherwise returns false. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">errno</td><td>will be set in error condition.<ul>
<li>EIO : Invalid output stream. </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l00993">993</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="a6eeeb3c4a73a9e6c80a18d2a8a0c0351" name="a6eeeb3c4a73a9e6c80a18d2a8a0c0351"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6eeeb3c4a73a9e6c80a18d2a8a0c0351">&#9670;&#160;</a></span>qlisttbl_lock()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void qlisttbl_lock </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;lock(): Enter critical section. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Normally explicit locking is only needed when traverse all the elements with qlisttbl-&gt;getnext(). </dd></dl>

<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l01021">1021</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="a6fa35afd89db427de7454a7dc174f366" name="a6fa35afd89db427de7454a7dc174f366"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6fa35afd89db427de7454a7dc174f366">&#9670;&#160;</a></span>qlisttbl_unlock()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void qlisttbl_unlock </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;unlock(): Leave critical section. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l01031">1031</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
<a id="a6dfcb2ffbd01fd4273605bc4684cccd9" name="a6dfcb2ffbd01fd4273605bc4684cccd9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6dfcb2ffbd01fd4273605bc4684cccd9">&#9670;&#160;</a></span>qlisttbl_free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void qlisttbl_free </td>
          <td>(</td>
          <td class="paramtype">qlisttbl_t *&#160;</td>
          <td class="paramname"><em>tbl</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>qlisttbl-&gt;free(): Free qlisttbl_t </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tbl</td><td>qlisttbl container pointer. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="qlisttbl_8c_source.html#l01041">1041</a> of file <a class="el" href="qlisttbl_8c_source.html">qlisttbl.c</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_0b61c55142250c0cc363383afd8075a4.html">containers</a></li><li class="navelem"><a class="el" href="qlisttbl_8c.html">qlisttbl.c</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7 </li>
  </ul>
</div>
</body>
</html>
